package com.gitee.wsl.compose.ui.calendar.config

import kotlinx.datetime.LocalDate

/**
 * Sealed class representing different selection modes for calendar dates.
 */
sealed class SelectionMode {
	/**
	 * Object representing single selection mode.
	 */
	data object Single : SelectionMode()

	/**
	 * Data class representing multiple selection mode with an optional buffer size.
	 *
	 * @property bufferSize The size of the buffer for multiple selection mode. Default is 2.
	 */
	data class Multiply(val bufferSize: Int = 2) : SelectionMode()

	/**
	 * Data class representing multiple selection mode with an optional buffer size.
	 *
	 * @property bufferSize The size of the buffer for multiple selection mode. Default is 2.
	 */
	data object Range : SelectionMode()
}

sealed interface SelectionResult {
	object None : SelectionResult
	data class Single(val date: LocalDate) : SelectionResult
	data class Multiple(val dates: List<LocalDate>) : SelectionResult
	data class Range(val start: LocalDate, val end: LocalDate) : SelectionResult
}